package com.cskaoyan.controller;

import com.cskaoyan.bean.MallUser;
import com.cskaoyan.bean.data.BaseData;
import com.cskaoyan.bean.param.UserParam;
import com.cskaoyan.bean.vo.BaseRespVo;
import com.cskaoyan.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("admin/user")
public class UserController {

    @Autowired
    UserService userService;

    @RequestMapping("list")
    //public BaseRespVo list(BaseParam param, String username, String mobile) {
    public BaseRespVo list(UserParam param) {
        //BaseData<User> userBaseData = userService.queryUser(param);
        //BaseData<MallUser> userBaseData = userService.queryUser2(param);
        BaseData<MallUser> userBaseData = userService.queryUser3(param);
        return BaseRespVo.ok(userBaseData);
    }

}
